local common = require("apigateway.common")
local ip = common.redis_config["ip"]
local port = common.redis_config["port"]

--检查url是否在白名单
local function check_url_whitelist()
	local uri = ngx.var.uri
	local urls = common.white_list(ip,port)
	for _,url in pairs(urls) do
		local m , s_ = ngx.re.match(uri,url)
		if  m then
			return true
		end
	end
	return false
	
end

local _M = {
	check_url_whitelist = check_url_whitelist
}
return _M
